{% extends 'layout.html.twig' %}

{% block body %}

{% if error %}
  <div class="alert alert-error">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
{% endif %}

<h2>登录</h2>

<form action="{{ path('login_check') }}" method="post">
  <div class="form-group">
    <label>用户名</label>
    <input type="text" name="_username" value="{{ last_username }}" class="form-control" />
  </div>
  <div class="form-group">
    <label>密码</label>
    <input type="password" name="_password" class="form-control" />
  </div>
  <div class="checkbox">
    <label>
      <input type="checkbox" name="_remember_me" checked /> 记住密码
    </label>
  </div>
  {{ form_csrf_token() }}
  <button type="submit" class="btn btn-primary">登录</button>
</form>



{% endblock %}